{% extends '../common/common.html' %}

{% block title %}Django | 文章列表{% endblock %}

{% block header %}{% endblock %}

{% block content-header %}
<h1>
    仪表盘
    <small>Optional description</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
    <li class="active">Here</li>
</ol>
{% endblock %}
{% block content %}
    <div class="row">
    <div class="col-xs-12">

        <div class="sub clearfix">
            <div class="pull-left">

            </div>
            <div class="pull-right">
                <form method="get" action="">
                    <input type="search" name="q"class="form-control input-sm" placeholder="搜索">
                    <button type="submit" class="btn btn-sm btn-default">搜索</button>
                </form>
            </div>
        </div>

        <div class="subsub subsub-top clearfix">
            <div class="pull-left">
                <select name="action" class="form-control input-sm" id="bulk-action-selector-top">
                    <option value="">批量操作</option>
                    <option value="trash">移至回收站</option>
                </select>
                <button class="btn btn-default btn-sm" id="do-action-top">应用</button>&nbsp;&nbsp;
                <a class="btn btn-success btn-sm" href="{% url 'backend:article-add' %}">添加</a>&nbsp;&nbsp;
            </div>
            <div class="pull-right">
            </div>
        </div>

        <div class="box box-solid box-table">
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <thead>
                    <tr>

                        <th>标题</th>
                        <th>图片</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tfoot>
                    <tr>

                        <th>标题</th>
                        <th>图片</th>
                        <th>操作</th>
                    </tr>
                    </tfoot>
                    <tbody>
                    {% for v in list %}
                    <tr>

                        <td>
                            {{ v.title }}
                        </td>

                        <td>
                            <img width="80px" src="{{ v.img }}" alt="{{ v.img }}">
                        </td>
                        <td>
                            <a href="{% url 'backend:article-edit' v.id %}" class="btn btn-primary btn-xs">编辑</a>
                            <a href="{% url 'backend:article-del' v.id %}" class="btn btn-danger btn-xs">删除</a>
                        </td>
                    </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->

        <div class="subsub subsub-bottom clearfix">
            <div class="pull-left">
                <select name="action" class="form-control input-sm" id="bulk-action-selector-bottom">
                    <option value="">批量操作</option>
                    <option value="trash">移至回收站</option>
                </select>
                <button type="submit" class="btn btn-default btn-sm" id="do-action-bottom">应用</button>&nbsp;&nbsp;
            </div>
            <div class="pull-right">
                {% include '../common/page.html' %}
            </div>
        </div>

    </div>
</div>
{% endblock %}

{% block footer %}{% endblock %}